(function($) { 
	'use strict';
	$(function() {
		//引入页头
		$.get(keter.path+"/static/common/header.html",function(data){
			$("#header").html(data);
			active(window.location.href);
		});
		
		//引入页脚
		$.get(keter.path+"/static/common/footer.html",function(data){
			//console.log($("#footer"));
			$("#footer").html(data);
		});		
		
	});
	
})(jQuery);

$(document).ready(function() {
	if(window.location.href.indexOf("addapp.html")>0){
		//alert(1);
		$("#btn-addapp").attr("style","display:none");
	}
});

    //处理标题页激活
	function active(url){
		if(url.indexOf("index.html")>0){
			$("#index").attr("class","am-active");
			$("#status").attr("class","");
		}
		else if(url.indexOf("status.html")>0){
			$("#status").attr("class","am-active");
			$("#index").attr("class","");
	    }
	}
	
	//处理状态菜单激活
	function activeMenu(url){
		if(url.indexOf("deploy-status.html")>0){
			$("#deploy").attr("class","am-active");
			$("#rtstatus").attr("class","");
			$("#app").attr("class","");
		}
		else if(url.indexOf("app-status.html")>0){
			$("#app").attr("class","am-active");
			$("#rtstatus").attr("class","");
			$("#deploy").attr("class","");
		}
		else if(url.indexOf("rt-status.html")>0){
			$("#rtstatus").attr("class","am-active");
			$("#app").attr("class","");
			$("#deploy").attr("class","");
		}
	}
